package cn.ctodb.divination;

import java.util.LinkedList;

/**
 * Created by cc on 2017/2/8.
 */
public class NameGlobal {

    private static final LinkedList<String[]> names = new LinkedList<>();

    public static synchronized void add(String xing, String ming) {
        String[] xm = new String[]{xing, ming};
        names.remove(xm);
        names.push(xm);
        if (names.size() > 100) {
            names.removeLast();
        }
    }

    public static LinkedList<String[]> getNames() {
        return names;
    }
}
